//
//  FMAudioPlayer.h
//  TestDemo
//
//  Created by fengxijun on 4/19/16.
//  Copyright © 2016 goappbox. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface FMAudioPlayer : NSObject

@property (nonatomic, assign) NSTimeInterval currentTime;

@property (nonatomic, assign) NSTimeInterval duration;

@property (nonatomic, strong, readonly) NSURL *url;

@property (nonatomic, copy) void(^audioStatusChanged)(NSInteger status);

@property (nonatomic, copy) void(^audioPlayProgress)(NSTimeInterval progress,NSTimeInterval duration);

- (instancetype)initWithFile:(NSString *)filepath;

- (instancetype) initWithUrl:(NSURL *)url;

- (void)play;

- (void)stop;

- (void)pause;

- (void)preparePlay;

- (void)playAtTime:(NSTimeInterval)timeInterval;

@end
